﻿using PortalCurriculo.Domain.Utils;
using PortalCurriculo.Util.Encryption;

namespace PortalCurriculo.Domain.Helpers
{
    public static class Util
    {
        public static string Criptografar(string texto)
        {
            var encryption = GetEncrypt();
            return encryption.Cryptograph(texto);
        }

        private static Encryption GetEncrypt()
        {
            return EncryptionHelper.CarregarChaveCriptografia();
        }

        public static string Descriptografar(string texto)
        {
            var encryption = GetEncrypt();

            return encryption.Decryptograph(texto);
        }
    }
}
